<template>
    <div>
        <el-row class="bg">
            <el-col :span="14" :offset="5" style="padding: 0">
                <el-button
                    type="primary"
                    @click="vx_link"
                    size="max"
                    style="width:90%;position:fixed;bottom:40px;left:5%;background:#fff;border-color:#3274bf;color:#3274bf"
                >点击下载</el-button>
                <el-dialog
                    width="100%"
                    height="100%"
                    top="0vh"
                    background="none"
                    title="请按指示操作"
                    :visible.sync="show"
                    :close-on-click-modal="false"
                >
                    <img src="../../assets/image/app/guide1.png" alt style="width:100%;height:100%" />
                </el-dialog>
            </el-col>
        </el-row>
    </div>
</template>

<script>
export default {
    name: "Login",
    data: function () {
        return {
            show: false,
        };
    },
    methods: {
        vx_link() {
            let ua = navigator.userAgent.toLowerCase();
            //Android终端
            let isAndroid =
                ua.indexOf("Android") > -1 || ua.indexOf("Adr") > -1;
            //Ios终端
            let isiOS = !!ua.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
            if (isWeixinBrowser()) {
                this.show = true;
                // this.$router.push({
                //     // path: '/login'
                //     path:'http://hhr.motic-et.com/static/apk/rtr.apk'
                // })
            } else {
                if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
                    //Ios
                    // window.location = 'https://itunes.apple.com/cn/app/id1469343286?mt=8'
                    this.$message("暂不支持");
                } else if (/(Android)/i.test(navigator.userAgent)) {
                    //Android终端
                    window.location =
                        "http://36.112.150.219:9999/upload/apk/mlk.apk";
                }
            }
            function isWeixinBrowser() {
                return /micromessenger/.test(ua) ? true : false;
            }
        },
    },
    computed: {},
};
</script>

<style lang="scss" scoped>
.el-dialog {
    width: 90% !important;
    background: none !important;
    margin-top: 0vh !important;
}

.biti_zhi {
    color: 24px;
    color: #009788;
    text-align: left;
    text-indent: 1.6em;
    padding-top: 20px;
}
.conbj {
    background: url("../../assets/image/app/colr@3x.png") no-repeat top right
        #fff !important;
    box-shadow: 0 0 10px #dadada;
    border-radius: 5px;
}
.bg {
    background: #fff url("../../assets/image/app/Phone_bg.png") no-repeat;
    -webkit-background-size: 100% auto;
    background-size: 100% auto;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}
.container {
    background: #fff;
    width: 100%;
    margin: 150px 0;
}
.img {
    width: 100%;
    height: 440px;
    background: url("../../assets/image/app/Login_img.png") center center
        no-repeat;
    -webkit-background-size: 98% auto !important;
    background-size: 98% auto !important;
}
.title {
    color: #009788;
    font-size: 18px;
    line-height: 30px;
    width: 100%;
    text-align: center;
    border-bottom: 2px #009788 solid;
}
.loginBtn {
    width: 100%;
    color: #fff;
    float: left;
    height: 40px;
    line-height: 40px;
    margin-bottom: 10px;
    cursor: pointer;
    background: #009788;
    width: 100%;
    margin-top: 20px;
    padding: 0;
    border-radius: 5px;
}
</style>